package org.web.standardplatform.client.domain.buildcode;

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class CodeMethodDTO {

    public CodeMethodDTO(String primaryKeyAttributeName, String tableJavaAttributeName) {
        this.primaryKeyAttributeName = primaryKeyAttributeName;
        this.tableJavaAttributeName = tableJavaAttributeName;
    }

    private String primaryKeyAttributeName;

    private String tableJavaAttributeName;

    public String getQueryByIdMethod() {
        return "select" + tableJavaAttributeName + "By" + primaryKeyAttributeName;
    }

    public String getQueryListMethod() {
        return "select" + tableJavaAttributeName + "List";
    }

    public String getCountMethod() {
        return "count" + tableJavaAttributeName + "List";
    }

    public String getInsertMethod() {
        return "insert" + tableJavaAttributeName;
    }

    public String getMapForPrimaryKeyMethod() {
        return "select" + tableJavaAttributeName + "MapFor" + primaryKeyAttributeName;
    }

    public String getBatchUpdateMethod() {
        return "batchUpdate" + tableJavaAttributeName + "List";
    }

    public String getBatchInsertMethod() {
        return "batchInsert" + tableJavaAttributeName + "List";
    }

    public String getBatchDeleteMethod() {
        return "batchDelete" + tableJavaAttributeName + "List";
    }

    public String getUpdateByIdMethod() {
        return "update" + tableJavaAttributeName + "By" + primaryKeyAttributeName;
    }

    public String getBatchSaveListMethod() {
        return "batchSave" + tableJavaAttributeName + "List";
    }

    public String getDeleteByIdMethod() {
        return "delete" + tableJavaAttributeName + "By" + primaryKeyAttributeName;
    }

    private String queryByIdMethod;

    private String queryListMethod;

    private String countMethod;

    private String insertMethod;

    private String updateMethod;

    private String deleteMethod;
}
